/**
 * Created by bman on 17-4-8.
 */
var sequelizex = require('sequelize-short');
var shortDataTypes = sequelizex.DataTypes;

module.exports = function (sequelize, DataTypes) {

    var History = sequelize.define('History', {
        // 进度
        progress : shortDataTypes.Int(0),
        // 是否收藏
        isCollect : shortDataTypes.Int(0),
        // 是否删除
        isDeleted : shortDataTypes.Int(0)
    },{
        associate: function (models) {
            models.History.belongsTo(models.Course);
            models.History.belongsTo(models.User);
        }
    });

    return History;
};